package design.patterns.builder;

/**
 * @author daxue0929
 * @date 2023/4/17
 * 指挥者
 */

public class Director {

    //声明Builder类型的变量
    private Builder builder;

    public Director(Builder builder) {
        this.builder = builder;
    }

    //组装自行车的功能
    public Bike construct() {
        builder.buildFrame();
        builder.buildSeat();
        return builder.createBike();
    }
}
